classdef FullGenerationChanger
    %UNTITLED Summary of this class goes here
    %   Detailed explanation goes here
    
    properties
    end
    
    methods
        function execute(~, obj)
            obj.generate_random_pattern
            obj.compute_objectives
            for k=1:(ceil(obj.size/2)) % to sie wywala przy nieparzystej liczbie osobnikow - kolejna genracja daje size-1 osobniokow
                obj.create_children();
            end
            obj.individuals = obj.next_generation;
            obj.next_generation = [];
            obj.sorted = false; %TODO: refactor - should not be need to remember to set this to false
        end
    end
    
end

